#include"thread.hpp"
void task (const std::string& name){
    int n=0;
    while(n<10){
        sleep(1);
    std::cout<<"I am running"<<std::endl;
    n++;
    }
}
using namespace th;
int main(){
thread pt("线程1",task);
pt.start();
sleep(5);
int i=pt.stop();
pt.join();
 std::cout<<"i ="<<i<<std::endl;
return 1;
}